<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateVulsCountTable extends Migration
{
    /**
     * 创建表
     *
     * @return void
     */
    public function up()
    {
        Schema::create('vuls_count', function (Blueprint $table) {
            $table->engine = 'InnoDB';
            $table->charset = 'utf8';
            $table->collation = 'utf8_general_ci';
            //字段
            $table->integer('year')->comment('年份');
            $table->integer('count')->comment('漏洞总数');
            $table->primary('year');
        });
    }

    /**
     * 删除表
     *
     * @return void
     */
    public function down()
    {
        //
        Schema::dropIfExists('vuls_count');
    }
}
